findElementByClassName

public abstract Optional<Element> findElementByClassName(String className)

Returns the first Element object found in the current search context by the given className. Returns an empty Optional if no element was found.

Parameters

className

a string that represents the class attribute of the HTML element

Throws

if the given className is empty

when this instance is closed